package com.gkwave.action.service;

import java.io.IOException;
import java.io.PrintWriter;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * @author Dhanasekar Rengasamy
 * @version 1.0.0
 * Servlet implementation class BaseServlet
 */
public abstract class BaseService extends HttpServlet {
	private static final long serialVersionUID = 1L;
	protected String xmlResponse = null;
	protected PrintWriter out;
       
    /**
     * @see HttpServlet#HttpServlet()
     */
    public BaseService() {
        super();
        // TODO Auto-generated constructor stub
    }

     /**
     * @param request
     * @param response
     * @throws ServletException
     * @throws IOException
     */
    public abstract void procesRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException ;

	/**
	 * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
	 */
	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		// TODO Auto-generated method stub
		procesRequest(request, response);
	}

	/**
	 * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
	 */
	protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		// TODO Auto-generated method stub
		procesRequest(request, response);
	}

}
